package top.kaoshanji.p2ch15a;

/**
 * 代码清单-p2ch15a-430页a：通过继承Thread创建线程
 * author kaoshanji
 * ^_^
 * create time 2025/2/23 10:50
 */
public class HelloThread extends Thread {

    @Override
    public void run() {
        System.out.println("thread name: " + Thread.currentThread().getName());
        System.out.println("hello");
    }

    public static void main(String[] args) {

        Thread thread = new HelloThread();
        thread.start();

    }

}
